const { Controller } = require('egg');

module.exports = class BaseConTroller extends Controller {
    // 成功的响应
    success(options) {
        const { ctx } = this;
        ctx.body = {
            code: 1,
            ...options,
        }
    }
    // 失败的响应
    error(options) {
        const { ctx } = this;
        ctx.body = {
            code: 0,
            ...options,
        }
    }
}